/*
 * Copyright 2010 - Jeremie Brebec
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.jb.coinche.client.gin;

import org.jb.coinche.client.business.handler.DisconnectHandler;
import org.jb.coinche.client.business.handler.impl.DisconnectHandlerImpl;
import org.jb.coinche.client.ui.card.AuctionPanel;
import org.jb.coinche.client.ui.card.CardList;
import org.jb.coinche.client.ui.card.ScorePanel;
import org.jb.coinche.client.ui.card.SetPanel;
import org.jb.coinche.client.ui.card.StatusPanel;
import org.jb.coinche.client.ui.card.impl.GameWindow;

import com.google.gwt.inject.client.AbstractGinModule;
import com.google.inject.Provides;

public class CoincheGUIModule extends AbstractGinModule {

	@Override
	protected void configure() {
		bind( DisconnectHandler.class ).to( DisconnectHandlerImpl.class );
	}
		
	@Provides
	public SetPanel getSetPanel( GameWindow gw ) {
		return gw.getSetPanel();
	}
	
	@Provides @Old
	public SetPanel getPlayedSetPanel( GameWindow gw ) {
		return gw.getPlayedSetPanel();
	}
	
	@Provides
	public CardList getCardList( GameWindow gw ) {
		return gw.getCardList();
	}

	@Provides
	public AuctionPanel getAuctionPanel( GameWindow gw ) {
		return gw.getAuctionPanel();
	}
	
	@Provides @Round
	public ScorePanel getRoundScore( GameWindow gw ) {
		return gw.getRoundScorePanel();
	}
	
	@Provides @Global
	public ScorePanel getGlobalScore( GameWindow gw ) {
		return gw.getGlobalScorePanel();
	}
	
	@Provides
	public StatusPanel getStatusPanel( GameWindow gw ) {
		return gw.getStatusPanel();
	}
}
